<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CSS绘制几何图形</title>
  <style>
    .squre {
      /* width: 40px;
      height: 0;
      padding-top: 40px;
      border: 1px solid red; */
      width: 50px;
      height: 50px;
      border: solid red;
    }

    .tri {
      width: 0;
      height: 0;
      border: 50px solid transparent;
      border-top-color: black;
    }
  </style>
</head>

<body>
  <div class="squre"></div>
  <hr>
  <div class="tri"></div>
</body>

</html>